import request from '@/utils/request'

export const selectPermissionList = () => {
  return request({ url: '/sys/permission' })
}

export const addPermission = (data) => {
  return request({ url: '/sys/permission', method: 'POST', data })
}

export const getPermissionDetail = (id) => {
  return request({ url: `/sys/permission/${id}` })
}

export const updatePermission = (data) => {
  return request({ url: `/sys/permission/${data.id}`, method: 'PUT', data })
}

export const deletePermission = (id) => {
  return request({ url: `/sys/permission/${id}`, method: 'DELETE' })
}
